#pragma once
#include <glm/vec3.hpp>

namespace gl
{
	struct particle
	{
		glm::vec3 position;
		glm::vec3 last_position;
		glm::vec3 a;
		glm::vec3 color;
		int life;
		int age;

		particle(int life, glm::vec3 pos,
				glm::vec3 velocity, glm::vec3 acceleration,
				glm::vec3 color)
			: position{pos}, last_position{pos-velocity}, a{acceleration},
			  color{color}, life{life}, age{0} {}

		void update(float step);
		bool expired() const { return (age >= life); }
	};
}

